From: Wei Wang Date: Thu, 12 Jan 2012 12:54:28 +0000 (+0100) Subject: amd iommu: Enable FC bit in iommu host level PTE X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=90ad72ce3ecf32b8b3051e1f22fa26cd3726a232;p=xen.git amd iommu: Enable FC bit in iommu host level PTE Signed-off-by: Wei Wang Committed-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 772f30fe89..43bf5e53a2 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -83,6 +83,13 @@ static bool_t set_iommu_pde_present(u32 *pde, unsigned long next_mfn, set_field_in_reg_u32(ir, entry, IOMMU_PDE_IO_READ_PERMISSION_MASK, IOMMU_PDE_IO_READ_PERMISSION_SHIFT, &entry); + + /* FC bit should be enabled in PTE, this helps to solve potential + * issues with ATS devices + */ + if ( next_level == IOMMU_PAGING_MODE_LEVEL_0 ) + set_field_in_reg_u32(IOMMU_CONTROL_ENABLED, entry, + IOMMU_PTE_FC_MASK, IOMMU_PTE_FC_SHIFT, &entry); pde[1] = entry; /* mark next level as 'present' */